import {createWebHistory, createRouter, createWebHashHistory} from "vue-router";
import index from '../view/index.vue'
import user from '../view/user.vue'
import attraction from '../view/attraction.vue'
import itinerary from '../view/itinerary.vue'
import itinerary_detail from '../view/itinerary_detail.vue'
import favorites from '../view/favorites.vue'
import review from '../view/review.vue'
import user_activity from '../view/user_activity.vue'
import notification from '../view/notification.vue'
import login from '../view/Login.vue'
import admin from "@/view/admin.vue";
import aiChat from "@/view/ai_chat.vue"
import carousel from "@/view/carousel.vue";
const routes = [
    {
        path: '/login',

        component: login
    },
    {
        path: '/',
        redirect:'/login',
        name: 'index',
        component: index,
        children: [
            {
                path: '/user',component: user
            },
            {
                path: '/attraction',component: attraction
            },
            {
                path: '/itinerary',component: itinerary
            },
            {
                path: '/itinerary_detail',component: itinerary_detail
            },
            {
                path: '/favorites',component: favorites
            },
            {
                path: '/review',component: review
            },
            {
                path: '/user_activity',component: user_activity
            },
            {
                path: '/notification',component: notification
            },
            {
                path:'/admin',component: admin
            },
            {
                path:'/ai-chat',component: aiChat
            },
            {
                path: '/carousel',component: carousel
            }
        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router;
